package com.castle.fortress.admin.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.goods.entity.GoodsEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
/**
 * 商品表Mapper 接口
 *
 * @author majunjie
 * @since 2021-11-22
 */
public interface GoodsMapper extends BaseMapper<GoodsEntity> {

    /**
    * 扩展信息列表
    * @param pageMap
    * @param goodsEntity
    * @return
    */
    List<GoodsEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("goodsEntity") GoodsEntity goodsEntity);

    /**
    * 扩展信息记录总数
    * @param goodsEntity
    * @return
    */
    Long extendsCount(@Param("goodsEntity") GoodsEntity goodsEntity);

    /**
    * 商品表扩展详情
    * @param id 商品表id
    * @return
    */
    GoodsEntity getByIdExtends(@Param("id")Long id);

    /**
     * 获取名称-关联查询用
     * @param id
     * @return
     */
    String getNameById(@Param("id") Long id);



}

